<?php

$loader->requireOnce('includes/SearchingCore/ISearchFilter.class.php');
/**
 * Search Filter
 * @package local.includes.SearchingCore
 * @author viethd
 * @version $Id$
 * @copyright 2009 LHV Company
 */
class SearchFilter implements ISearchFilter {	
	private $logger ;
	//sql is defined follow the structure in Ordo
	//array (
    //        'cols'      =>  "",
    //        'from'      =>  "",
    //        'where'     =>  "",
    //        'orderby'   =>  ""); 	
	private $sql = array();	
	
	function __construct() {		
		$this->logger = LoggerManager::getLogger('local.includes.SearchingCore.SearchFilter');
		
	}
	
	public function renderSearchFilter() {
	    //current default implementation empty filter
	    return "Default search filter";	    
	}
	
    public function buildSearchFilterSql($filterData = array()) {
        return $this->sql;                
    }
    
    public function buildResultModel($rawResultData = array()) {
        if (!is_array($rawResultData) || count($rawResultData)) {
            //return empty result model
            return array();
        }
        //for now return empty array 
        return array();
    }
    
}
?>